package com.songcha.sakura.bean


import com.songcha.library_network.bean.BaseBean
import com.songcha.library_network.bean.BaseListDataBean
import org.json.JSONArray
import org.json.JSONObject
import java.io.Serializable

 class ComicListBean : BaseListDataBean<ComicListBean.ComicBean>() {

  data class ComicBean(val title:String,
                       val href:String,
                       val data_original:String,
                       val update:String,
                       val score:String,
                       val year:String,
                       val describe:String,
  ):Serializable

    override fun toString(): String {
        val d = JSONObject()
        val arr = JSONArray()
        for(i in 0 until  data.size){
            val item=data[i]
            val comic = JSONObject()
            comic.put("title", item.title)
            comic.put("href", item.href)
            comic.put("data_original", item.data_original)
            comic.put("update", item.update)
            comic.put("score", item.score)
            comic.put("year", item.year)
            comic.put("describe", item.describe)
            arr.put(comic)
        }
        d.put("data", arr)
        return d.toString()
    }

}